package com.oywy.rbac.repository;

import com.oywy.rbac.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * 用户Repo
 *
 * @author oywy
 * @date 2018/10/22
 */
@Repository
public interface UserRepository extends JpaRepository<User, String> {
    /**
     * 根据用户名查找
     *
     * @param username
     * @return
     */
    Optional<User> findByUsername(String username);
}
